﻿using System;
using System.Collections.Generic;

using System.Text;
using OpenTK;
namespace Xeno.Core
{
    public class XenoProp : Attribute
    {
        public Type Type { get; private set; }
       
        public string Name { get; private set; }
        public XenoProp(string name, Type type)
        {
            Type = type;
           
            Name = name;
        }
    }
    public class XenoModule
    {

        [XenoProp("Name",typeof(string))]
        public string Name { get; set; }
        public string ModuleAuthor { get; set; }
        public string ModuleCopyright { get; set; }
        public string ModuleVersionString { get; set; }
        [XenoProp("InvertWorld",typeof(bool))]
        public bool InvertWorld { get; set; }
        public XenoNode Attached { get; set; }
        public virtual bool InBounds(Vector3 point)
        {
            return false;
        }
        public XenoModule()
        {
            Name = "XenoModule";
            ModuleAuthor = "Double Think Games";
            ModuleCopyright = "(c)Double Think Games 2009";
            ModuleVersionString = "Unknown";
            ResetModule();
        }
        public void ResetModule()
        {
            InvertWorld = false;
        }

        public void PerformUpdate()
        {

            DoUpdate();
        }
        public void PerformRender()
        {

            DoRender();
        }

        public virtual void DoUpdate()
        {

        }

        public virtual void DoRender()
        {

        }

    }
}
